﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="SearchProduct.aspx.cs" Inherits="Framework.SearchProduct" %>

<%@ Register Src="Controls/PagingControl.ascx" TagName="PagingControl" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#main').addClass('page-content');
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <section id="main-content">
        <div class="row-fluid">
            <div class="form-group">
                <asp:TextBox ID="txtSearchAdvanced" runat="server" CssClass="float-left form-control"
                    placeholder="Nhập từ khoá" Style="margin-bottom: 0px;"></asp:TextBox>
                <asp:Button ID="btnSearchAdvanced" runat="server" CssClass="float-left btn btn-default"
                    OnClick="btnSearchAdvanced_Click" Text="Tìm kiếm" />
            </div>
            <h3>
                <a id="aArticle" runat="server">
                    <%= DGSFramework.Globals.GetLanguage("Tìm kiếm bài viết", "Search articles", true)%></a>
                | <a class="actived" href="javascript:void(0)">
                    <%= DGSFramework.Globals.GetLanguage("Tìm kiếm sản phẩm", "Search products", true)%></a></h3>
        </div>
        <section class="recent-works">
            <div class="row-fluid">
                <asp:Repeater ID="rpProduct" runat="server" OnItemDataBound="rpProduct_ItemDataBound">
                    <ItemTemplate>
                        <div class="row-fluid">
                            <asp:Repeater ID="rpProductSub" runat="server">
                                <ItemTemplate>
                                    <div class="span3 project">
                                        <div class="post-thumbnail">
                                            <a href="<%# ResolveUrl("~/" + DGSFramework.Globals.GetUrl(Eval("UrlRewrite").ToString(), DGSFramework.Globals.GetUrlAspx(Eval("UrlRewrite").ToString(), false) + Eval("ProductID").ToString())) %>"
                                                title="<%# DGSFramework.Globals.GetLanguage(Eval("Title"), Eval("Title_en"), true) %>">
                                                <div class="plus" style="left: 0px; opacity: 0; top: -30px;">
                                                    +</div>
                                                <span class="hover" style="opacity: 0.55; display: none;"></span>
                                                <img alt="<%# !string.IsNullOrEmpty(Eval("ImageAlt").ToString()) ? Eval("ImageAlt").ToString() : Eval("Title").ToString() %>"
                                                    style="width: 240px; height: 150px" src="<%# DGSFramework.ConfigPaths.Path_ImageProduct_Folder.Substring(1) + Eval("ImageUrl")%>">
                                            </a>
                                        </div>
                                        <!-- end post-thumbnail -->
                                        <h3 class="project-title post-title">
                                            <a href="<%# ResolveUrl("~/" + DGSFramework.Globals.GetUrl(Eval("UrlRewrite").ToString(), DGSFramework.Globals.GetUrlAspx(Eval("UrlRewrite").ToString(), false) + Eval("ProductID").ToString())) %>"
                                                title="<%# DGSFramework.Globals.GetLanguage(Eval("Title"), Eval("Title_en"), true) %>">
                                                <%# DGSFramework.Globals.GetLanguage(Eval("Title"), Eval("Title_en"), true)%></a></h3>
                                        <span class="georgia">
                                            <%= DGSFramework.Globals.GetLanguage("Giá", "Price", true) %>:
                                            <%# decimal.Parse(Eval("PromotionPrice").ToString()) != 0 ? (String.Format("{0:0,0}", Eval("PromotionPrice")) + " VND") : (decimal.Parse(Eval("SalePrice").ToString()) == 0 ? DGSFramework.Globals.GetLanguage("Liên hệ lấy giá", "Call to get price", true) : (String.Format("{0:0,0}", Eval("SalePrice"))) + " VND")%><br />
                                            <%= DGSFramework.Globals.GetLanguage("Mô tả", "Description", true)%>:
                                            <%# DGSFramework.Globals.TruncateString(DGSFramework.Globals.GetLanguage(Eval("Summary"), Eval("Summary_en"), true), 150)%>
                                        </span>
                                    </div>
                                    <!-- end project -->
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
            <!-- end row -->
            <div class="clear">
            </div>
            <div class="navigation nav-portfolio rights portfolio-pag" id="postsNav">
                <div class="pagination_links">
                    <div class="visible-desktop visible-tablet">
                        <div class="numbers-pag">
                            <uc1:PagingControl ID="PagingControl1" runat="server" />
                        </div>
                    </div>
                </div>
                <!-- end pagination_links -->
            </div>
            <div class="clear">
            </div>
        </section>
    </section>
</asp:Content>
